<?php
 	// Config
	$data = array(
	    "id"	=> "logoutButton",
	    "name"	=> "logoutButton",
	    "type"	=> "submit",
	    "value"	=> "logout");
    
    $attributes = array(
    	"name"	=> "logoutForm",
    	"id"	=> "logoutForm"
    );
	
    // Printing logout form
    echo 
		"<p>Welcome " . $user['username'] . "</p>" .
 		"<p>"
			. form_open(current_url(), $attributes) . 
			  	form_submit($data) . 
			  form_close() . 
		"</p>";